# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kphotoalbum
pkgver=5.7.0
pkgrel=0
pkgdesc="KDE Photo Album, picture collection manager"
url="https://kphotoalbum.org"
# mips, ppc64le and s390x blocked by marble-dev
# armhf blocked my libkgeomap
arch="all !ppc64le !s390x !armhf !mips !mips64"
license="GPL-2.0-or-later"
makedepends="extra-cmake-modules qt5-qtbase-dev phonon-dev karchive-dev kcompletion-dev kconfig-dev kcoreaddons-dev kdoctools-dev ki18n-dev kiconthemes-dev kjobwidgets-dev kio-dev ktextwidgets-dev kxmlgui-dev kwidgetsaddons-dev jpeg-dev exiv2-dev libkipi-dev purpose-dev libkdcraw-dev marble-dev libkgeomap-dev"
subpackages="$pkgname-doc $pkgname-lang"
source="https://download.kde.org/stable/kphotoalbum/$pkgver/kphotoalbum-$pkgver.tar.xz"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="36153fd946c7819540b1867a24b968103f7101d1d9ddc49a09b70df4b419380875b3016863417ba8326b50fd844d255888cd5b6f2d4ecf1e1a607d0c97e16851  kphotoalbum-5.7.0.tar.xz"
